// 数据库
import 'reflect-metadata';
import { createConnection } from 'typeorm';
import { tableList } from '../entity';

export function Connection() {
    return createConnection({
        type: 'mysql',
        host: 'localhost',
        port: 3306,
        username: 'root',
        password: '***',
        database: 'vote',
        entities: tableList,
        synchronize: true,
        logging: false
    });
}